function boltzcomp()
%
% compare boltzman estimates from different studies...
%

bpar(1) = setboltz('Manis&Marx,1990', 1, -53.0, 2.38, 1, -58 );
bpar(2) = setboltz('Rothman&Manis2003', 1, -48, 6, 1, -60);
bpar(3) = setboltz('Ball&Oertel2001', 1, -45, 9, 1, -62);
bpar(4) = setboltz('Rathouz&Trussell', 1, -58, 9.7, 1, -66);


for i = 1:length(bpar)
    y = boltzs(bpar(i), bpar(i).vr)
    fprintf(1, '%22s  fraction: %7.3f\n', bpar(i).study, y);
end;


function result = setboltz(study, gmax, vhalf, slope, power, rest)

result = [];
result.study = study;
result.gmax = gmax;
result.vh = vhalf;
result.z = slope;
result.n = power;
result.vr = rest;


function y = boltzs(bpar, x)% x, p1, p2, p3)
y = (bpar.gmax./(1+exp(-(x-bpar.vh)/bpar.z)))^(1/bpar.n);
return;
